package kms

type GenerateDataKeyReq struct {
	Keyid  string `json:"keyid"`
	Keylen int    `json:"keylen"`
}

func (req *GenerateDataKeyReq) action() string {
	return "GenerateDataKey"
}

type GenerateDataKeyRes struct {
	ResCommon
	Result struct {
		Plaintext  string `json:"plaintext"`
		Ciphertext string `json:"ciphertext"`
	} `json:"result"`
}

func (c *Client) GenerateDataKey(req *GenerateDataKeyReq) (res GenerateDataKeyRes, err error) {
	err = c.Request(req, &res)
	return
}
